- textStorage.addAttributes([.foregroundColor: NSColor.syntax.option], range: match.range(at: 1))
- textStorage.addAttributes([.foregroundColor: NSColor.syntax.number], range: match.range(at: 2))
+ textStorage.addAttributes(
+ [.foregroundColor: NSColor.syntax.option], range: match.range(at: 1))
+ textStorage.addAttributes(
+ [.foregroundColor: NSColor.syntax.number], range: match.range(at: 2))
+ }
+
+ matches = groupRegex.matches(in: textStorage.string, options: [], range: range)
+
+ for match in matches {
+ textStorage.addAttributes(
+ [.foregroundColor: NSColor.syntax.option], range: match.range(at: 1))
+ textStorage.addAttributes(
+ [.foregroundColor: NSColor.syntax.vertex], range: match.range(at: 2))